home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / QuickTime™ 3.0b11 / QTPublicInterfaces / RIncludes / Dialogs.r < prev    next >
Encoding:
Text File  |  1998-01-12  |  6.8 KB  |  249 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Dialogs.r
  3.  
  4.      Contains:    Dialog Manager interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0 Beta
  8.  
  9.      Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18.  
  19. #ifndef __DIALOGS_R__
  20. #define __DIALOGS_R__
  21.  
  22. #ifndef __CONDITIONALMACROS_R__
  23. #include "ConditionalMacros.r"
  24. #endif
  25.  
  26. #ifndef __MACWINDOWS_R__
  27. #include "MacWindows.r"        /* for 'wctb' */
  28. #endif
  29.  
  30.  
  31. /*----------------------------wctb • Alert Color Lookup Table--------------------------*/
  32. type 'actb' as 'wctb';
  33.  
  34.  
  35. /*----------------------------ALRT • Alert Template-------------------------------------*/
  36. /*
  37.     ALRT_RezTemplateVersion:
  38.         0 - original                             <-- default
  39.         1 - additional positioning info at end    
  40. */
  41. #ifndef ALRT_RezTemplateVersion
  42.     #ifdef SystemSevenOrLater                    /* grandfather in use of “SystemSevenOrLater” */
  43.         #define ALRT_RezTemplateVersion 1
  44.     #else
  45.         #define ALRT_RezTemplateVersion 0
  46.     #endif
  47. #endif
  48.  
  49.  
  50. type 'ALRT' {
  51.         rect;                                                    /* boundsRect            */
  52.         integer;                                                /* 'DITL' ID            */
  53.  
  54.         /* NOTE: the stages are ordered 4, 3, 2, 1 */
  55.         wide array [4] {
  56.                 boolean                 OK, Cancel;             /* Bold Outline         */
  57.                 boolean                 invisible, visible;     /* Draw Alert            */
  58.                 unsigned bitstring[2]    silent = 0
  59.                                 sound1, sound2, sound3;         /* Beeps                */
  60.         };
  61.  
  62. #if ALRT_RezTemplateVersion == 1
  63.     /*    The following are alert positioning options used by System 7.0 and later */
  64.         unsigned integer                noAutoCenter = 0x0000,
  65.                                         centerMainScreen = 0x280a,
  66.                                         alertPositionMainScreen = 0x300a,
  67.                                         staggerMainScreen = 0x380a,
  68.                                         centerParentWindow = 0xa80a,
  69.                                         alertPositionParentWindow = 0xb00a,
  70.                                         staggerParentWindow = 0xb80a,
  71.                                         centerParentWindowScreen = 0x680a,
  72.                                         alertPositionParentWindowScreen = 0x700a,
  73.                                         staggerParentWindowScreen = 0x780a;
  74. #endif
  75. };
  76.  
  77. /* stages for ALRT */
  78. #define silentStage OK, visible, silent
  79. #define silentStages { silentStage; silentStage; silentStage; silentStage; }
  80.  
  81. #define beepStage OK, visible, sound1
  82. #define beepStages { beepStage; beepStage; beepStage; beepStage; }
  83.  
  84.  
  85. /*----------------------------dctb • Dialog Color Lookup Table--------------------------*/
  86. type 'dctb' as 'wctb';
  87.  
  88.  
  89. /*----------------------------DITL • Dialog Item List-----------------------------------*/
  90. type 'DITL' {
  91.         integer = $$CountOf(DITLarray) - 1;                     /* Array size            */
  92.         wide array DITLarray {
  93.                 fill long;
  94.                 rect;                                            /* Item bounds            */
  95.                 switch {
  96.  
  97.                 case HelpItem:                                    /* Help Mgr type item */
  98.                         boolean         enabled,disabled;        /* Enable flag            */
  99.                         key bitstring[7] = 1;                    /* this is a new type = 1 */
  100.  
  101.                         switch {
  102.                             case HMScanhdlg:
  103.                                 byte = 4;                        /* sizeola                */
  104.                                 key int = 1;                    /* key value             */
  105.                                 integer;                        /* resource ID            */
  106.  
  107.                             case HMScanhrct:
  108.                                 byte = 4;                        /* sizeola                */
  109.                                 key int = 2;                    /* key value             */
  110.                                 integer;                        /* resource ID            */
  111.  
  112.                             case HMScanAppendhdlg:
  113.                                 byte = 6;                        /* sizeola                */
  114.                                 key int = 8;                    /* key value             */
  115.                                 integer;                        /* resource ID            */
  116.                                 integer;                        /* offset (zero based)    */
  117.                         };
  118.  
  119.  
  120.                 case Button:
  121.                         boolean         enabled,disabled;        /* Enable flag            */
  122.                         key bitstring[7] = 4;
  123.                         pstring;                                /* Title                */
  124.  
  125.                 case CheckBox:
  126.                         boolean         enabled,disabled;        /* Enable flag            */
  127.                         key bitstring[7] = 5;
  128.                         pstring;                                /* Title                */
  129.  
  130.                 case RadioButton:
  131.                         boolean         enabled,disabled;        /* Enable flag            */
  132.                         key bitstring[7] = 6;
  133.                         pstring;                                /* Title                */
  134.  
  135.                 case Control:
  136.                         boolean         enabled,disabled;        /* Enable flag            */
  137.                         key bitstring[7] = 7;
  138.                         byte = 2;
  139.                         integer;                                /* 'CTRL' ID            */
  140.  
  141.                 case StaticText:
  142.                         boolean         enabled,disabled;        /* Enable flag            */
  143.                         key bitstring[7] = 8;
  144.                         pstring;                                /* Text                 */
  145.  
  146. #if !TARGET_OS_MAC
  147.                 case StaticTextRightJust:
  148.                         boolean         enabled,disabled;        /* Enable flag            */
  149.                         key bitstring[7] = 9;
  150.                         pstring;                                /* Text                    */
  151. #else
  152.                 case StaticTextRightJust:
  153.                         boolean         enabled,disabled;        /* Enable flag            */
  154.                         key bitstring[7] = 8;
  155.                         pstring;                                /* Text                    */
  156. #endif
  157. #if !TARGET_OS_MAC
  158.                 case EditTextScrollable:
  159.                         boolean         enabled,disabled;        /* Enable flag            */
  160.                         key bitstring[7] = 17;
  161.                         pstring;
  162.                                                                 /* Text                 */
  163.                 case EditTextReadOnlyScrollable:
  164.                         boolean         enabled,disabled;        /* Enable flag            */
  165.                         key bitstring[7] = 18;
  166.                         pstring;                                /* Text                 */
  167. #endif
  168.                 case EditText:
  169.                         boolean         enabled,disabled;        /* Enable flag            */
  170.                         key bitstring[7] = 16;
  171.                         pstring;
  172.                                                                 /* Text                 */
  173.  
  174.  
  175.                 case Icon:
  176.                         boolean         enabled,disabled;        /* Enable flag            */
  177.                         key bitstring[7] = 32;
  178.                         byte = 2;
  179.                         integer;                                /* 'ICON' ID            */
  180.  
  181.                 case Picture:
  182.                         boolean         enabled,disabled;        /* Enable flag            */
  183.                         key bitstring[7] = 64;
  184.                         byte = 2;
  185.                         integer;                                /* 'PICT' ID            */
  186.  
  187.                 case UserItem:
  188.                         boolean         enabled,disabled;        /* Enable flag            */
  189.                         key bitstring[7] = 0;
  190.                         byte = 0;
  191.                 };
  192.                 align word;
  193.         };
  194. };
  195.  
  196.  
  197. /*----------------------------DLOG • Dialog Template------------------------------------*/
  198. /*
  199.     DLOG_RezTemplateVersion:
  200.         0 - original                             <-- default
  201.         1 - additional positioning info at end    
  202. */
  203. #ifndef DLOG_RezTemplateVersion
  204.     #ifdef SystemSevenOrLater                    /* grandfather in use of “SystemSevenOrLater” */
  205.         #define DLOG_RezTemplateVersion 1
  206.     #else
  207.         #define DLOG_RezTemplateVersion 0
  208.     #endif
  209. #endif
  210.  
  211.  
  212. type 'DLOG' {
  213.         rect;                                                    /* boundsRect            */
  214.         integer         documentProc,                            /* procID                */
  215.                         dBoxProc,
  216.                         plainDBox,
  217.                         altDBoxProc,
  218.                         noGrowDocProc,
  219.                         movableDBoxProc,
  220.                         zoomDocProc = 8,
  221.                         zoomNoGrow = 12,
  222.                         rDocProc = 16;
  223.         byte            invisible, visible;                     /* visible                */
  224.         fill byte;
  225.         byte            noGoAway, goAway;                        /* goAway                */
  226.         fill byte;
  227.         unsigned hex longint;                                    /* refCon                */
  228.         integer;                                                /* 'DITL' ID            */
  229.         pstring;                                                /* title                */
  230. #if DLOG_RezTemplateVersion == 1
  231.     /*    The following are window positioning options used by System 7.0 and later */
  232.         align word;
  233.         unsigned integer                noAutoCenter = 0x0000,
  234.                                         centerMainScreen = 0x280a,
  235.                                         alertPositionMainScreen = 0x300a,
  236.                                         staggerMainScreen = 0x380a,
  237.                                         centerParentWindow = 0xa80a,
  238.                                         alertPositionParentWindow = 0xb00a,
  239.                                         staggerParentWindow = 0xb80a,
  240.                                         centerParentWindowScreen = 0x680a,
  241.                                         alertPositionParentWindowScreen = 0x700a,
  242.                                         staggerParentWindowScreen = 0x780a;
  243. #endif
  244. };
  245.  
  246.  
  247. #endif /* __DIALOGS_R__ */
  248.  
  249.